package com.xy.csdn.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

import java.net.URI;
import java.net.URISyntaxException;

/**
 * @author chuanjieyang
 * @since May 22, 2019 15:36:25 PM
 */
@Component
public class SchedulingCSDN {
    @Autowired
    private RestTemplate restTemplate;

    private int i=0;
    //@Scheduled(fixedRate = 60*1000)
    void doCSDN() throws URISyntaxException {


        /*HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
        URI url = new URI("http://47.112.101.44:8456/pdd/buyerInfo");
        RequestEntity<Object> orderEntity = new RequestEntity<>(headers,HttpMethod.GET,url);
        ResponseEntity<String> result = restTemplate.exchange(orderEntity, String.class);
        System.out.println(result);*/

    }
}
